<script setup>
defineOptions({
  name:"MenuCard"
})
const props = defineProps({
  menu: {
    type: Object,
    default: () => {},
  },
})
import { useRouter } from 'vue-router';
const router = useRouter();
const handleClick = ()=>{
  console.log(props.menu);

  router.push({
    path: "/redirect/workspace/"+props.menu.id,
  })
}
</script>

<template>
  <div class="p-10px menu-card rounded-lg flex flex-col items-center">
    <y-icon :icon="props.menu.icon" class="mb-5px font-size-xl"></y-icon>
    <span>{{ props.menu.title }}</span>
  </div>
</template>

<style lang="less" scoped>
.menu-card{
  background-color: var(--theme-bg-secondary);
}
</style>
